#!/usr/bin/env ruby

class CreateNameDomain < ActiveRecord::Migration
	def self.up
	#	create_table :messages do |t|
		#	t.column :user_id, :string, :null => false
	#		t.column :src_text, :string, :null => false
	#		t.column :src_id, :string, :null => false
	#	end

=begin
		create_table :tokens do |t|
			t.column :token, :string, :null => false
			t.column :score, :integer, :default => 0
		end
=end

		create_table :configs do |t|
			t.column :key, :string, :null => false
			t.column :value, :string, :null => false
		end

		create_table :users do |t|
			t.column :url, :string, :default => ''
			t.column :user_id, :long, :null => false
			t.column :screen_name, :string
			t.column :statuses_count, :integer, :default => 0
			t.column :description, :string, :default => ''
			t.column :created_at, :date
			t.column :profile_image_url, :string
			t.column :active, :integer
			t.column :distance, :integer, :default => 0
		end

		create_table :follows do |t|
			t.column :follower, :long
			t.column :followed, :long
		end
	end

	def self.down
		drop_table :tokens
		drop_table :messages
		drop_table :users
	end
end
